package com.sunny.lh;

public class Singleton {

    private static Singleton singleton;

    private Singleton(){}

    public static Singleton getInstance(){

        if(null == singleton){
            synchronized (Singleton.class){
                if(null == singleton){
                    singleton = new Singleton();
                }
            }
        }

        return singleton;
    }

    public void op(){
        System.out.println("ok");
    }

}
